package com.example.demo.entites;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class RegionStats implements Comparable<RegionStats>{
    private String state;
    private String country;
    private int latestTotalCaes;
    private int diffFromPrevDay;

    @Override
    public int compareTo(RegionStats o) {
//        按国家排序
        return this.country.compareTo(o.country);
    }
}
